<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="dao.*"  %>
<%@page import="entity.*"  %>
<%@page import="java.util.List"  %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="5">
<meta charset="UTF-8">
<title>学生信息管理</title>
<link rel="stylesheet" type="text/css" href="naive.css" />
</head>
<body>
<h1 class="p">学生信息管理</h1>
<table >
<tr><td>img</td><td>id</td><td>pId</td><td>name</td><td>sex</td><td>birthdate</td></tr>


<%
	if(session.getAttribute("loginName")==null)  
	{
	response.sendRedirect("login.jsp");  
	}	
List<JavaBean> list=StudentDao.readList();
	request.setCharacterEncoding("utf-8");
	for(JavaBean l:list)
	{
		pageContext.setAttribute("d", l);
%>
 		  <tr><td><a href="img.jsp?cid=${d.id}&action=img"> 显示</a> </td>
           <td>${d.id}</td>
              <td>${d.pId}</td>
              <td>${d.name}</td>
               <td>${d.sex}</td>
               <td>${d.birthdate}</td>
          </tr>
<%
	}
%>

<tr><td colspan="3"><a href="Update.jsp">修改</a></td><td colspan="3"><a href="export.jsp" target="_blank">导出</a></td></tr>
<tr><td colspan="3"><a href="Delete.jsp">删除</a></td><td colspan="3"><a href="import.jsp" target="_blank">导入</a></td></tr>
</table>

</body>
</html>